package com.easy.frame.servers.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.easy.frame.base.api.pojo.BasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 系统租户表
 *
 * @author zzf
 * @since 2020-12-14
 */
@Getter
@Setter
@ToString
@TableName("sys_tenant")
@ApiModel("系统租户表")
public class SysTenant extends BasePO {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("编号")
    private String code;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("是否拥有所有权限[0：不是所有，1：所有权限]")
    private Integer allAuth;

    @TableField(typeHandler = JacksonTypeHandler.class)
    @ApiModelProperty("类型")
    private List<Integer> type;

    @ApiModelProperty("状态 [1正常 2过期 3禁用]")
    private Integer status;

    @ApiModelProperty("过期时间")
    private LocalDateTime expireTime;

    @ApiModelProperty("是否有效")
    private Integer enabled;
}